package com.scs.application.modules.print.dto;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Description:打印配置DTO
 */
@Data
@Accessors(chain = true)
public class TemplateDTO {

    @JSONField(ordinal = 0)
    private String id;

    @JSONField(ordinal = 1)
    private String busType;

    @JSONField(ordinal = 2)
    private String printType;

    @JSONField(ordinal = 3)
    private String configJson;

    @JSONField(ordinal = 4)
    private List<FieldDTO> fieldDTOS;

    @Data
    @Accessors(chain = true)
    public static class FieldDTO {

        @JSONField(ordinal = 0)
        private String id;

        @JSONField(ordinal = 1)
        private String templateId;

        @JSONField(ordinal = 2)
        private String type;

        @JSONField(ordinal = 3)
        private String field;

        @JSONField(ordinal = 4)
        private String label;

        @JSONField(ordinal = 5)
        private Integer sort;

        @JSONField(ordinal = 6)
        private Integer width;

        @JSONField(ordinal = 7)
        private Boolean summary;

        @JSONField(ordinal = 8)
        private Integer fontSize;

        @JSONField(ordinal = 9)
        private String format;

        @JSONField(ordinal = 10)
        private Boolean flagGroup;

        @JSONField(ordinal = 11)
        private Boolean flagBreak;

        @JSONField(ordinal = 12)
        private String dict;

        @JSONField(ordinal = 13)
        private String expression;

        @JSONField(ordinal = 14)
        private String formation;

        @JSONField(ordinal = 15)
        private Boolean flagFontBold;

        @JSONField(ordinal = 16)
        private Boolean flagLineFeed;

        @JSONField(ordinal = 17)
        private String orderRule;

        @JSONField(ordinal = 18)
        private Boolean flagShowNegative;

        @JSONField(ordinal = 19)
        private Boolean flagShareRow;

        @JSONField(ordinal = 20)
        private String ShareRow;

        @JSONField(ordinal = 21)
        private String alignType;

        //隐藏表达式
        @JSONField(ordinal = 22)
        private String hideExpression;

        @JSONField(ordinal = 23)
        private Boolean flagHideColon;
    }
}
